package com.tools.ad.strategy.outer;

import android.text.format.DateUtils;

import com.cpu.time.AppRunTimeManager;
import com.hm.adsbuisiness.bean.HmAdPlace;
import com.hm.base.android.mob.AMApplication;
import com.tools.ad.ADModule;
import com.tools.ad.log.MLog;

/**
 * desc:
 * date: 2018/4/19
 * author: ancun
 */

public class SwipeExecutor extends OuterCommonAdExecutor {

    public SwipeExecutor(AMApplication context, ADModule adModule, String adScene) {
        super(context, adModule, adScene);
    }

    @Override
    protected String getTag() {
        return SwipeExecutor.class.getName();
    }

    public boolean isOutProtect(HmAdPlace hmAdPlace) {
        int protect = hmAdPlace.getProTime();
        if (protect * DateUtils.HOUR_IN_MILLIS > AppRunTimeManager.getInstance().getAppUsedTime()) {
            if (MLog.debug) {
                MLog.e("SwipeGuideStrategyExecutor", "check 保护时间内");
            }
            return false;
        }
        return true;
    }

}
